package com.hkts.management.pay.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author yck
 * @since 2021-08-12
 */
@ApiModel(description = "信息费支付记录")
public class HktsPayRecord extends Model<HktsPayRecord> {

    private static final long serialVersionUID = 1L;
   @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 支付单号
     */
    @ApiModelProperty(value = "支付交易订单")
    private String payOrder;
    /**
     * 司机id
     */
    @ApiModelProperty(value = "司机id")
    private String driverId;
    /**
     * 运单id
     */
    @ApiModelProperty(value = "运单id")
    private String orderId;
    /**
     * 支付状态
     */
    @ApiModelProperty(value = "交易状态")
    private String payStatus;
    /**
     * 公司code
     */
    @ApiModelProperty(value = "公司code")
    private String companyCode;

    /**
     * 公司code
     */
    @ApiModelProperty(value = "司机姓名")
    @TableField(exist = false)
    private String driverName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 交易成功时间
     */
    @ApiModelProperty(value = "交易成功时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime successTime;

    @ApiModelProperty(value = "金额")
    private BigDecimal deposit;

    @ApiModelProperty(value = "开始时间")
    @TableField(exist = false)

    private String startTime;

    @ApiModelProperty(value = "结束时间")
    @TableField(exist = false)

    private String endTime;

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public BigDecimal getDeposit() {
        return deposit;
    }

    public void setDeposit(BigDecimal deposit) {
        this.deposit = deposit;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPayOrder() {
        return payOrder;
    }

    public void setPayOrder(String payOrder) {
        this.payOrder = payOrder;
    }

    public String getDriverId() {
        return driverId;
    }

    public void setDriverId(String driverId) {
        this.driverId = driverId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getSuccessTime() {
        return successTime;
    }

    public void setSuccessTime(LocalDateTime successTime) {
        this.successTime = successTime;
    }

    public static final String ID = "id";

    public static final String PAY_ORDER = "pay_order";

    public static final String DRIVER_ID = "driver_id";

    public static final String ORDER_ID = "order_id";

    public static final String PAY_STATUS = "pay_status";

    public static final String COMPANY_CODE = "company_code";

    public static final String CREATE_TIME = "create_time";

    public static final String SUCCESS_TIME = "success_time";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "HktsPayRecord{" +
                ", id=" + id +
                ", payOrder=" + payOrder +
                ", driverId=" + driverId +
                ", orderId=" + orderId +
                ", payStatus=" + payStatus +
                ", companyCode=" + companyCode +
                ", createTime=" + createTime +
                ", successTime=" + successTime +
                "}";
    }
}
